<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>健康档案 - 邦伴用户端</title>
  <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
  <style>
    :root {
      --primary: #ff7e2d;
      --primary-light: #fff3ea;
      --border: #f0f0f0;
      --text-main: #222;
      --text-sub: #888;
    }
    
    body {
      font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
      background-color: #f8f8f8;
      color: var(--text-main);
    }
    
    .app-container {
      width: 375px;
      height: 812px;
      margin: 0 auto;
      background: #fff;
      position: relative;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
      overflow-y: auto;
    }
    
    .primary-color {
      color: var(--primary);
    }
    
    .primary-bg {
      background-color: var(--primary);
    }
    
    .primary-light-bg {
      background-color: var(--primary-light);
    }
    
    .btn-primary {
      background-color: var(--primary);
      color: white;
    }
    
    .btn-outline {
      border: 1px solid var(--primary);
      color: var(--primary);
    }
    
    .card {
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    
    .tab-active {
      color: var(--primary);
      border-bottom: 2px solid var(--primary);
    }
    
    .health-card {
      background: linear-gradient(135deg, #ff7e2d, #ff9d5c);
      border-radius: 12px;
      color: white;
    }
    
    .record-item {
      border-bottom: 1px solid var(--border);
    }
    
    .record-item:last-child {
      border-bottom: none;
    }
    
    .health-icon {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  </style>
</head>
<body>
  <div class="app-container">
    <!-- 顶部导航栏 -->
    <div class="sticky top-0 z-10 bg-white border-b border-gray-100 px-4 py-3 flex items-center">
      <a href="user_center.html" class="mr-2">
        <i class="fas fa-arrow-left text-lg"></i>
      </a>
      <h1 class="text-lg font-medium flex-1 text-center">健康档案</h1>
      <a href="health_settings.html" class="text-sm text-gray-500">
        <i class="fas fa-cog"></i>
      </a>
    </div>
    
    <!-- 健康数据摘要 -->
    <div class="p-4">
      <div class="health-card p-4">
        <div class="flex items-center justify-between mb-3">
          <h2 class="text-lg font-medium">健康指数</h2>
          <span class="text-sm opacity-80">良好</span>
        </div>
        
        <div class="flex items-center justify-between">
          <div class="text-center">
            <div class="text-2xl font-bold">85</div>
            <div class="text-xs opacity-80 mt-1">健康评分</div>
          </div>
          <div class="text-center">
            <div class="text-2xl font-bold">175</div>
            <div class="text-xs opacity-80 mt-1">身高(cm)</div>
          </div>
          <div class="text-center">
            <div class="text-2xl font-bold">70</div>
            <div class="text-xs opacity-80 mt-1">体重(kg)</div>
          </div>
          <div class="text-center">
            <div class="text-2xl font-bold">A</div>
            <div class="text-xs opacity-80 mt-1">血型</div>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 家庭成员选择 -->
    <div class="px-4 py-2">
      <div class="flex items-center overflow-x-auto whitespace-nowrap pb-2">
        <div class="flex flex-col items-center mr-4 min-w-max">
          <div class="w-14 h-14 rounded-full bg-white border-2 border-primary flex items-center justify-center overflow-hidden">
            <img src="https://via.placeholder.com/150" alt="张先生" class="w-full h-full object-cover">
          </div>
          <span class="text-xs mt-1 primary-color">张先生(本人)</span>
        </div>
        
        <div class="flex flex-col items-center mr-4 min-w-max">
          <div class="w-14 h-14 rounded-full bg-white border border-gray-200 flex items-center justify-center overflow-hidden">
            <img src="https://via.placeholder.com/150" alt="李女士" class="w-full h-full object-cover">
          </div>
          <span class="text-xs mt-1">李女士(配偶)</span>
        </div>
        
        <div class="flex flex-col items-center mr-4 min-w-max">
          <div class="w-14 h-14 rounded-full bg-white border border-gray-200 flex items-center justify-center overflow-hidden">
            <img src="https://via.placeholder.com/150" alt="张小明" class="w-full h-full object-cover">
          </div>
          <span class="text-xs mt-1">张小明(儿子)</span>
        </div>
        
        <div class="flex flex-col items-center min-w-max">
          <div class="w-14 h-14 rounded-full bg-gray-100 border border-dashed border-gray-300 flex items-center justify-center">
            <i class="fas fa-plus text-gray-400"></i>
          </div>
          <span class="text-xs mt-1">添加成员</span>
        </div>
      </div>
    </div>
    
    <!-- 健康记录标签页 -->
    <div class="px-4 border-b border-gray-200">
      <div class="flex">
        <div class="tab-active px-4 py-3 text-center">
          <span>体检报告</span>
        </div>
        <div class="px-4 py-3 text-center text-gray-500">
          <span>健康指标</span>
        </div>
        <div class="px-4 py-3 text-center text-gray-500">
          <span>用药记录</span>
        </div>
        <div class="px-4 py-3 text-center text-gray-500">
          <span>就诊记录</span>
        </div>
      </div>
    </div>
    
    <!-- 体检报告列表 -->
    <div class="px-4 py-4">
      <div class="flex justify-between items-center mb-4">
        <h2 class="text-base font-medium">体检报告</h2>
        <a href="upload_report.html" class="text-sm primary-color">
          <i class="fas fa-plus mr-1"></i>上传报告
        </a>
      </div>
      
      <div class="bg-white rounded-lg">
        <div class="record-item p-4">
          <div class="flex">
            <div class="health-icon bg-blue-100 text-blue-500 mr-3">
              <i class="fas fa-file-medical"></i>
            </div>
            <div class="flex-1">
              <div class="flex justify-between items-center">
                <h3 class="font-medium">2023年度体检报告</h3>
                <span class="text-xs text-gray-500">2023-09-15</span>
              </div>
              <p class="text-xs text-gray-500 mt-1">北京协和医院</p>
              <div class="flex mt-2">
                <span class="text-xs bg-blue-100 text-blue-600 px-2 py-0.5 rounded mr-2">血常规</span>
                <span class="text-xs bg-blue-100 text-blue-600 px-2 py-0.5 rounded mr-2">肝功能</span>
                <span class="text-xs bg-blue-100 text-blue-600 px-2 py-0.5 rounded">心电图</span>
              </div>
            </div>
          </div>
        </div>
        
        <div class="record-item p-4">
          <div class="flex">
            <div class="health-icon bg-green-100 text-green-500 mr-3">
              <i class="fas fa-heartbeat"></i>
            </div>
            <div class="flex-1">
              <div class="flex justify-between items-center">
                <h3 class="font-medium">心脏专项检查报告</h3>
                <span class="text-xs text-gray-500">2023-07-22</span>
              </div>
              <p class="text-xs text-gray-500 mt-1">北京安贞医院</p>
              <div class="flex mt-2">
                <span class="text-xs bg-green-100 text-green-600 px-2 py-0.5 rounded mr-2">心电图</span>
                <span class="text-xs bg-green-100 text-green-600 px-2 py-0.5 rounded">超声心动图</span>
              </div>
            </div>
          </div>
        </div>
        
        <div class="record-item p-4">
          <div class="flex">
            <div class="health-icon bg-purple-100 text-purple-500 mr-3">
              <i class="fas fa-x-ray"></i>
            </div>
            <div class="flex-1">
              <div class="flex justify-between items-center">
                <h3 class="font-medium">肺部CT检查报告</h3>
                <span class="text-xs text-gray-500">2023-05-08</span>
              </div>
              <p class="text-xs text-gray-500 mt-1">北京朝阳医院</p>
              <div class="flex mt-2">
                <span class="text-xs bg-purple-100 text-purple-600 px-2 py-0.5 rounded">肺部CT</span>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 健康指标 -->
    <div class="px-4 py-4 bg-gray-50">
      <div class="flex justify-between items-center mb-4">
        <h2 class="text-base font-medium">健康指标</h2>
        <a href="health_data.html" class="text-sm primary-color">查看更多</a>
      </div>
      
      <div class="grid grid-cols-2 gap-3">
        <div class="bg-white rounded-lg p-3">
          <div class="flex items-center justify-between mb-2">
            <span class="text-sm text-gray-500">血压</span>
            <span class="text-xs text-gray-400">今日</span>
          </div>
          <div class="flex items-baseline">
            <span class="text-xl font-medium">120/80</span>
            <span class="text-xs text-gray-500 ml-1">mmHg</span>
          </div>
          <div class="text-xs text-green-500 mt-1">正常范围</div>
        </div>
        
        <div class="bg-white rounded-lg p-3">
          <div class="flex items-center justify-between mb-2">
            <span class="text-sm text-gray-500">血糖</span>
            <span class="text-xs text-gray-400">今日</span>
          </div>
          <div class="flex items-baseline">
            <span class="text-xl font-medium">5.2</span>
            <span class="text-xs text-gray-500 ml-1">mmol/L</span>
          </div>
          <div class="text-xs text-green-500 mt-1">正常范围</div>
        </div>
        
        <div class="bg-white rounded-lg p-3">
          <div class="flex items-center justify-between mb-2">
            <span class="text-sm text-gray-500">心率</span>
            <span class="text-xs text-gray-400">今日</span>
          </div>
          <div class="flex items-baseline">
            <span class="text-xl font-medium">75</span>
            <span class="text-xs text-gray-500 ml-1">次/分</span>
          </div>
          <div class="text-xs text-green-500 mt-1">正常范围</div>
        </div>
        
        <div class="bg-white rounded-lg p-3">
          <div class="flex items-center justify-between mb-2">
            <span class="text-sm text-gray-500">体重</span>
            <span class="text-xs text-gray-400">今日</span>
          </div>
          <div class="flex items-baseline">
            <span class="text-xl font-medium">70</span>
            <span class="text-xs text-gray-500 ml-1">kg</span>
          </div>
          <div class="text-xs text-yellow-500 mt-1">轻度超重</div>
        </div>
      </div>
    </div>
    
    <!-- 健康提醒 -->
    <div class="px-4 py-4">
      <div class="flex justify-between items-center mb-4">
        <h2 class="text-base font-medium">健康提醒</h2>
        <a href="health_reminder.html" class="text-sm primary-color">设置</a>
      </div>
      
      <div class="bg-white rounded-lg">
        <div class="record-item p-4">
          <div class="flex items-center">
            <div class="health-icon bg-red-100 text-red-500 mr-3">
              <i class="fas fa-pills"></i>
            </div>
            <div>
              <h3 class="font-medium">服药提醒</h3>
              <p class="text-xs text-gray-500 mt-1">每日 8:00, 12:00, 18:00</p>
            </div>
            <div class="ml-auto">
              <label class="relative inline-flex items-center cursor-pointer">
                <input type="checkbox" value="" class="sr-only peer" checked>
                <div class="w-9 h-5 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-primary"></div>
              </label>
            </div>
          </div>
        </div>
        
        <div class="record-item p-4">
          <div class="flex items-center">
            <div class="health-icon bg-blue-100 text-blue-500 mr-3">
              <i class="fas fa-tint"></i>
            </div>
            <div>
              <h3 class="font-medium">血压测量</h3>
              <p class="text-xs text-gray-500 mt-1">每日 7:30, 19:30</p>
            </div>
            <div class="ml-auto">
              <label class="relative inline-flex items-center cursor-pointer">
                <input type="checkbox" value="" class="sr-only peer" checked>
                <div class="w-9 h-5 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-primary"></div>
              </label>
            </div>
          </div>
        </div>
        
        <div class="record-item p-4">
          <div class="flex items-center">
            <div class="health-icon bg-green-100 text-green-500 mr-3">
              <i class="fas fa-walking"></i>
            </div>
            <div>
              <h3 class="font-medium">运动提醒</h3>
              <p class="text-xs text-gray-500 mt-1">每日 17:00</p>
            </div>
            <div class="ml-auto">
              <label class="relative inline-flex items-center cursor-pointer">
                <input type="checkbox" value="" class="sr-only peer">
                <div class="w-9 h-5 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-primary"></div>
              </label>
            </div>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 底部空间 -->
    <div class="pb-20"></div>
  </div>

  <script>
    document.addEventListener('DOMContentLoaded', function() {
      // 标签页切换
      const tabs = document.querySelectorAll('.px-4.border-b.border-gray-200 .px-4.py-3');
      
      tabs.forEach(tab => {
        tab.addEventListener('click', function() {
          // 移除所有标签的激活状态
          tabs.forEach(t => {
            t.classList.remove('tab-active');
            t.classList.add('text-gray-500');
          });
          
          // 激活当前标签
          this.classList.add('tab-active');
          this.classList.remove('text-gray-500');
          
          // 这里可以添加内容切换逻辑
        });
      });
      
      // 开关切换
      const toggles = document.querySelectorAll('input[type="checkbox"]');
      
      toggles.forEach(toggle => {
        toggle.addEventListener('change', function() {
          // 这里可以添加开关状态改变的逻辑
          console.log(this.checked ? '开启' : '关闭');
        });
      });
    });
  </script>
</body>
</html> 